#ifndef MY_CHARACTER_H
#define MY_CHARACTER_H

#include "GameEntity.h"
#include "MoveBehavior.h"
#include "Background.h"

class MoveBehavior;

class Character :
	public GameEntity
{
public:
	Character(const entity_type nType = GHOST, const int nPoint = 0, const int nLoopToRespawn = 50)
		:GameEntity		(nType, nPoint)
		,mLoopToRespawn	(nLoopToRespawn)
		,mRemainLoops	(0)
	{}

	BackgroundElement* mAdjacentTiles[PROXIMITY_COUNT];

	//to set the proximity I need the background, so I cannot set it private or protected
	virtual void setupProximity(const Background* bg, BackgroundElement* tile);

	const int updateRemainLoops() { return --mRemainLoops; }

	virtual void move(Background* bg);
	virtual void moveTo(const Background* bg, BackgroundElement* nTile) = 0;

	virtual void DrawTo(Bitmap* renderTarget, const bool specialActive, const int x = 0, const int y = 0);
	virtual void DrawTo(Bitmap* renderTarget, const int x = 0, const int y = 0);

protected:
	MoveBehavior* mMoveBehavior;
	Bitmap* mImage;
	Bitmap* mSpecImage;

		  int mRemainLoops;
	const int mLoopToRespawn;
};

#endif //MY_CHARACTER_H